<template>
  <div class="page">
    <el-pagination
      background
      layout="prev, pager, next,sizes,jumper"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :page-sizes="[5, 10, 20, 50]"
      :total="total"
    >
    </el-pagination>
  </div>
</template>
<script>
export default {
  props: ['total', 'page', 'pagesize', 'getChoiceList'],
  data () {
    return {}
  },
  created () {},
  computed: {},
  methods: {
    handleSizeChange (val) {
      this.$emit('update:pagesize', val)
      this.getChoiceList()
    },
    handleCurrentChange (val) {
      this.$emit('update:page', val)
      this.getChoiceList()
    }
  }
}
</script>
<style lang="scss" scoped>
.page {
  text-align: right;
}
::v-deep .el-pagination__jump {
  margin-left: 0;
}
</style>
